package cn.doit.scala.day03

/**
 * @DATE 2021/12/27/9:13
 * @Author MDK
 * @Version 2021.2.2
 * */
object C01_Foreach {
  def main(args: Array[String]): Unit = {
    val array: Array[Int] = Array[Int](1, 2, 3, 4, 5, 6, 7, 8)
    val ls = List[String]("zss","lss","ny","ly","fjj")
    val mp = Map[String, String]("sl"->"fsy","wd"->"zsf","em"->"zzr","gb"->"qf")

    array.foreach(e=>{
      val i = e*10
      println(s"hello $i")
    })
    println("-----------------------------------------------------------------------")
    ls.foreach(e =>print(e.toUpperCase+"\t\r\n"))
    println("-----------------------------------------------------------------------")

    val zip: Map[(String, String), String] = mp.zip(ls)
    zip.foreach(e=>{
      val name = e._1._2
      val name2 = e._2
      println(s"$name $name2")
    })
  }
}
